﻿#region << 文 件 说 明 >>
/*----------------------------------------------------------------
// 文件名称：ColumnContent
// 创 建 者：杨程
// 创建时间：2021/9/1 17:30:57
// 文件版本：V1.0.0
// ===============================================================
// 功能描述：
//		
//
//----------------------------------------------------------------*/
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace V.CodeGenerator.ViewModel.Common
{
    /// <summary>
    /// 数据表的列信息类
    /// </summary>
    public class ColumnContent
    {
        public ColumnContent() { }
        public ColumnContent(bool key, bool identity, string colName, string typeName, int _byte,
            int length, int xscale, bool isnullable, string _default, string comment)
        {
            this.Key = key;
            this.Identity = identity;
            this.ColName = colName;
            this.TypeName = typeName;
            this.Byte = _byte;
            this.Length = length;
            this.Xscale = xscale;
            this.Isnullable = isnullable;
            this.Default = _default;
            this.Comment = comment;
        }
        /// <summary>
        /// 是否主键
        /// </summary>
        public bool Key { get; set; }
        /// <summary>
        /// 是否自增
        /// </summary>
        public bool Identity { get; set; }
        /// <summary>
        /// 列名
        /// </summary>
        public string ColName { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public string TypeName { get; set; }
        /// <summary>
        /// 大小
        /// </summary>
        public int Byte { get; set; }
        /// <summary>
        /// 长度
        /// </summary>
        public int Length { get; set; }
        public int Xscale { get; set; }
        /// <summary>
        /// 是否可为空
        /// </summary>
        public bool Isnullable { get; set; }
        public string Default { get; set; }
        /// <summary>
        /// 数据库字段注释
        /// </summary>
        public string Comment { get; set; }
    }
}
